<template>
  <el-form-item label="负责人">
    <el-row>
      <el-col :span="4">
        <el-select v-model="dataArr.manageUserName" size="small" placeholder="请选择" @change="burlChangeVal">
          <el-option
            v-for="item in optionsPersonCharge"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </el-col>
    </el-row>
  </el-form-item>
</template>

<script>
  export default {
    name: 'apiPersonCharge',
    props: ['form'],
    data() {
      return {
        dataArr: this.form,
        optionsPersonCharge: [
          {
            value: this.$store.state.user.name,
            label: this.$store.state.user.name
          }
        ]
      }
    },
    methods: {
      burlChangeVal(val) {
        console.log(val)
        let objName = {}
        objName = this.optionsPersonCharge.find(item => {
          return item.value === val
        })
        this.dataArr.manageUserId = objName.value
        this.dataArr.manageUserName = objName.label
        this.$emit('changeFormFun', this.dataArr)
      }
    }
  }
</script>

<style scoped>

</style>
